package com.yhq.spring.spring.conf;

import com.yhq.spring.spring.po.Student;
import org.springframework.beans.factory.config.AbstractFactoryBean;

/**
 * @author hqyin
 * @date 2023/4/12 3:11 下午
 */
//@Component("student")
public class StudentFactoryBean extends AbstractFactoryBean<Object> {
    @Override
    public Class<?> getObjectType() {
        return Student.class;
    }

    @Override
    protected Object createInstance() throws Exception {
        Student student = new Student();
        student.setName("Lisa");
        student.setClassName("一班");
        student.setAge(18);
        return student;
    }
}
